package com.ruoyi.shaketicket.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.shaketicket.mapper.ShaketicketConfigMapper;
import com.ruoyi.shaketicket.domain.ShaketicketConfig;
import com.ruoyi.shaketicket.service.IShaketicketConfigService;
import com.ruoyi.common.support.Convert;

/**
 * 摇一摇奖项配置 服务层实现
 * 
 * @author lzy
 * @date 2019-03-01
 */
@Service
public class ShaketicketConfigServiceImpl implements IShaketicketConfigService 
{
	@Autowired
	private ShaketicketConfigMapper shaketicketConfigMapper;

	/**
     * 查询摇一摇奖项配置信息
     * 
     * @param id 摇一摇奖项配置ID
     * @return 摇一摇奖项配置信息
     */
    @Override
	public ShaketicketConfig selectShaketicketConfigById(String id)
	{
	    return shaketicketConfigMapper.selectShaketicketConfigById(id);
	}
	
	/**
     * 查询摇一摇奖项配置列表
     * 
     * @param shaketicketConfig 摇一摇奖项配置信息
     * @return 摇一摇奖项配置集合
     */
	@Override
	public List<ShaketicketConfig> selectShaketicketConfigList(ShaketicketConfig shaketicketConfig)
	{
	    return shaketicketConfigMapper.selectShaketicketConfigList(shaketicketConfig);
	}
	
    /**
     * 新增摇一摇奖项配置
     * 
     * @param shaketicketConfig 摇一摇奖项配置信息
     * @return 结果
     */
	@Override
	public int insertShaketicketConfig(ShaketicketConfig shaketicketConfig)
	{
	    return shaketicketConfigMapper.insertShaketicketConfig(shaketicketConfig);
	}
	
	/**
     * 修改摇一摇奖项配置
     * 
     * @param shaketicketConfig 摇一摇奖项配置信息
     * @return 结果
     */
	@Override
	public int updateShaketicketConfig(ShaketicketConfig shaketicketConfig)
	{
	    return shaketicketConfigMapper.updateShaketicketConfig(shaketicketConfig);
	}

	/**
     * 删除摇一摇奖项配置对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteShaketicketConfigByIds(String ids)
	{
		return shaketicketConfigMapper.deleteShaketicketConfigByIds(Convert.toStrArray(ids));
	}
	
}
